package com.xuan.juc;

public class test {
    public static Object obj =new Object();
    public static void main(String[] args) {

    }

    public void syn(){
        synchronized (obj){
            System.out.println("--------------");
        }
    }
    public synchronized void syn1(){
        System.out.println("--------------");
    }

}
